package com.limy.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@EnableTransactionManagement
@Configuration
@MapperScan("com.limy.mapper")
public class UserConfig {
     private Logger logger=LoggerFactory.getLogger(UserConfig.class);
     @Bean
    public PaginationInterceptor pagenationInterceptor(){
         logger.info("分页拦截器初始化---------");
         PaginationInterceptor paginationInterceptor=new PaginationInterceptor();
        return paginationInterceptor;
     }


}
